package org.gntc.prayer.friends;

import org.gntc.prayer.R;

import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.widget.TabHost;

public class FriendsMainActivity extends FragmentActivity
{
	/** Called when the activity is first created. */
	
	/**
	 * onCreate
	 */
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.friends_main);
		
		// Tab host
		TabHost tabhost = (TabHost) findViewById(R.id.friends_tabhost);
		tabhost.setup();
		
		TabHost.TabSpec spec;
		
		// Friends
		Drawable icoPerson = getResources().getDrawable(R.drawable.ic_social_person);
		spec = tabhost.newTabSpec("friends_list");
		spec.setIndicator(getString(R.string.friends), icoPerson);
		spec.setContent(R.id.friends_main_list);
		tabhost.addTab(spec);
		
		// Group
		Drawable icoGroup = getResources().getDrawable(R.drawable.ic_social_group);
		spec = tabhost.newTabSpec("group");
		spec.setIndicator(getString(R.string.group), icoGroup);
		spec.setContent(R.id.friends_main_group);
		tabhost.addTab(spec);
		
		// Select tab
		tabhost.setCurrentTab(0);
	}

}
